package com.cyy.api.controller;


import com.cyy.common.domain.Response;
import com.cyy.common.service.CategoryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author caoyunyou
 */
@Tag(name = "分类-API", description = "分类-API")
@RestController
@RequestMapping("/v1/category")
@RequiredArgsConstructor
public class ApiCategoryController {

    private final CategoryService categoryService;


    @Operation(summary = "分类列表")
    @GetMapping("/list")
    public Response queryList() {
        return Response.success().data(categoryService.queryList());
    }
}
